package com.gof.example.composite.safe_component;

/**
 * Created with IntelliJ IDEA.
 * Created by zhiyuan on 2018/5/6 19:04.
 * haiming.fei@tongdun.cn
 */
public class App {

    public static void main(String[] args) {
        SafeComponent c1 = new Checkbox();
        SafeComponent c2 = new Button();
        SafeComponent c3 = new TextInput();
        Pannel c4 = new Pannel();
        Window c5 = new Window();

        c4.addComponent(c1);
        c4.addComponent(c2);

        c5.addComponent(c4);
        c5.addComponent(c3);

        c5.refresh();
    }
}
